{if($gnlx == 'dlgn')}
<!-- 独立功能开始 -->
{if(@$dlgn)}
{foreach($dlgn as $k=>$v)}
<!-- 权限判断开始 -->
{if($ad_qx == 0 || in_array($v['id'],$ad_qx) == 1)}
	<!-- 二级功能开始 -->
	{if(@$v['xj'])}
	{foreach($v['xj'] as $k1=>$v1)}
	<li {if(@$v_get['dbs'] == $v['dbs'] && ($v_get['xbs'] == $v1['xbs'] || @$v_get['ebs'] == @$v1['xbs']))}class="active opened active"{/if}>
		<a href="{if($v1['url']=='#')}#{else}{$_url}{$v1['url']}&gnid={$v['id']}&dbs={$v['dbs']}&xbs={$v1['xbs']}{/if}">
			{if(@$v1['tbys'])}<i class="{$v1['tbys']}"></i>{/if}
			<span class="title">{$v1['name']}</span>
		</a>
		<!-- 三级功能开始 -->
		{if(@$v1['xxj'])}
		<ul>
			{foreach($v1['xxj'] as $k2=>$v2)}
			<li {if(@$v_get['dbs'] == $v['dbs'] && $v_get['xbs'] == $v2['xbs'])}class="active"{/if}>
				<a href="{if($v2['url']=='#')}#{else}{$_url}{$v2['url']}&gnid={$v['id']}&dbs={$v['dbs']}&ebs={$v1['xbs']}&xbs={$v2['xbs']}{/if}">
					{if(@$v2['tbys'])}<i class="{$v2['tbys']}"></i>{/if}
					<span class="title">{$v2['name']}</span>
				</a>
			</li>
			{/foreach}
		</ul>
		{/if}
		<!-- 三级功能结束 -->
	</li>
	{/foreach}
	{/if}
	<!-- 二级功能结束 -->
{/if}
<!-- 权限判断结束 -->
{/foreach}
{/if}
<!-- 独立功能结束 -->
{else}
<!-- 基础功能开始 -->
{if(@$gn)}
{foreach($gn as $k=>$v)}
<!-- 权限判断开始 -->
{if($ad_qx == 0 || in_array($v['id'],$ad_qx) == 1)}
<li {if(@$v_get['dbs'] == $v['dbs'])}class="active opened active"{/if}>
	<a href="{if($v['url']=='#')}#{else}{$_url}{$v['url']}&gnid={$v['id']}&dbs={$v['dbs']}{/if}">
		<i class="{$v['tbys']}"></i>
		<span class="title">{$v['name']}</span>
	</a>
	<!-- 二级功能开始 -->
	{if(@$v['xj'])}
	<ul>
		{foreach($v['xj'] as $k1=>$v1)}
		<li {if(@$v_get['dbs'] == $v['dbs'] && ($v_get['xbs'] == $v1['xbs'] || @$v_get['ebs'] == @$v1['xbs']))}class="active opened active"{/if}>
			<a href="{if($v1['url']=='#')}#{else}{$_url}{$v1['url']}&gnid={$v['id']}&dbs={$v['dbs']}&xbs={$v1['xbs']}{/if}">
				{if(@$v1['tbys'])}<i class="{$v1['tbys']}"></i>{/if}
				<span class="title">{$v1['name']}</span>
			</a>
			<!-- 三级功能开始 -->
			{if(@$v1['xxj'])}
			<ul>
				{foreach($v1['xxj'] as $k2=>$v2)}
				<li {if(@$v_get['dbs'] == $v['dbs'] && $v_get['xbs'] == $v2['xbs'])}class="active"{/if}>
					<a href="{if($v2['url']=='#')}#{else}{$_url}{$v2['url']}&gnid={$v['id']}&dbs={$v['dbs']}&ebs={$v1['xbs']}&xbs={$v2['xbs']}{/if}">
						{if(@$v2['tbys'])}<i class="{$v2['tbys']}"></i>{/if}
						<span class="title">{$v2['name']}</span>
					</a>
				</li>
				{/foreach}
			</ul>
			{/if}
			<!-- 三级功能结束 -->
		</li>
		{/foreach}
	</ul>
	{/if}
	<!-- 二级功能结束 -->
</li>
{/if}
<!-- 权限判断结束 -->
{/foreach}
{/if}
<!-- 基础功能结束 -->
{/if}